<html lang="ru">
    <head>
        <title>{% block title %}Матпраздник{% endblock %}</title>
        <link rel="stylesheet" href="{{ STATIC_URL }}foundation/stylesheets/foundation.min.css">
        <link rel="stylesheet" href="{{ STATIC_URL }}foundation/stylesheets/app.css">
        <link rel="stylesheet" href="{{ STATIC_URL }}jquery-ui.css">

        <script src="{{ STATIC_URL }}foundation/javascripts/jquery.js"></script>
        <script src="{{ STATIC_URL }}foundation/javascripts/foundation.min.js"></script>
        <script src="{{ STATIC_URL }}jquery-ui.js"></script>

        <style type="text/css">
            body {
                padding: 30px 10px 0px 10px;
            }

            .row {
                width: 100%;
            }

            .summary, .menu, .upload-block, .download-block {
                border: 1px solid #eee;
                -moz-border-radius: 8px;
                border-radius: 8px;
            }

            .summary, .upload-block, .download-block {
                padding: 0em 1em 1em 1em;
                margin: 10px 10px 0px 0px;
            }

{#            .upload-block, .download-block {#}
{#                padding: 6px 1em 23px 1em;#}
{#                margin: 10px 10px 0px 0px;#}
{#            }#}

            .menu {
                padding: 6px 1em 0em 1.5em;
                margin: 10px 0px 0px 10px;
            }

            .upload-hint {
                margin-top: 1em;
                font-size: xx-small;
            }
        </style>
    </head>

    <body>
        <div class="row">
            <div class="ten columns offset-by-two">
                    <h1>Матпраздник 2013</h1>
            </div>
        </div>

        <div class="row">
            <div class="two columns">
                <div class="menu">
                    <ul class="side-nav">
                        <li{% ifequal nav 'participants' %} class="active"{% endifequal %}><a href="{% url 'main_app.views.participants' %}">все участники</a></li>
                        <li{% ifequal nav 'schools' %} class="active"{% endifequal %}><a href="{% url 'main_app.views.schools' %}">все школы</a></li>
                        <li{% ifequal nav 'points' %} class="active"{% endifequal %}><a href="{% url 'main_app.views.points' %}">ввод результатов</a></li>
                        <li{% ifequal nav 'diplomas' %} class="active"{% endifequal %}><a href="{% url 'main_app.views.diplomas' %}">дипломы</a></li>
                    </ul>
                </div>
            </div>

            <div class="seven columns">
                <h3>{% block content-title %}Заголовок содержания{% endblock %}</h3>
                <div class="content">{% block content %}Содержание{% endblock %}</div>
            </div>

            <div class="three columns">
                {% if nav == 'participants' %}
                    <div class="upload-block">
                        <h5>{% block upload-title %}Залить какой-то документ{% endblock %}</h5>
                        <input type="file" id="uploaded-file">
                        <button type="submit" class="radius button">Залить</button>
                        {% block no-upload-hint %}
                            <div class="upload-hint">
                            {% block upload-hint %}Тут ещё подсказка к нему{% endblock %}
                            </div>
                        {% endblock %}
                        {% comment %}
                        Usage:
                            -- on pages with upload-hint you should specify just "upload-hint" block
                            -- on pages with no upload-hint you should say {% block no-upload-hint %}{% endblock %}

                        By no means is it graceful.
                        http://stackoverflow.com/questions/2035385/test-for-existence-of-template-block-in-a-template
                        {% endcomment %}
                    </div>
                {% endif %}
{#                {% if nav == 'diplomas' %}#}
                    <div class="download-block">
                        <h5>{% block download-link %}Скачать какой-то документ{% endblock %}</h5>
                        <form method="get" action="{% url 'main_app.views.diplomas_csv' %}">
                            <button class="radius button" type="submit">Скачать csv</button>
                        </form>
                    </div>
{#                {% endif %}#}
                <div class="summary">
                    <h5>Информация </h5>
                    Всего участников в базе: {{ num_participants }} <br>

                    Участников с непустым номером: {{ number_not_null }} <br>

                    Участников с введенными баллами: {{ participants_with_score }}

                </div>
            </div>
        </div>
    </body>
</html>
